Particular embodiments generally relate to call graph analysis.
A call graph is a directed graph that represents calling relations between functions in a software system. The software system may be a combination of hardware and software, e.g., a computing system executing a software program. The call graph may represent relationships between sub-routines (e.g., functions) in the software program. A call graph profiler can construct a call graph by collecting calling sequences between functions along with resource consumption during execution of the software program by a computing device. Users then use a call graph generated by the call graph profiler to optimize the software program.
One problem with call graph analysis is the complexity of large software systems. For example, with a large number of functions and call sequences, the call graph may become very large and complex. In this case, a user analyzing the call graph may only analyze small parts of the call graph. However, some critical problems may have occurred in unanalyzed parts of the call graph.
Another problem is that call graph analysis becomes exponentially difficult if multiple call graphs are involved. For example, the investigation of gradual performance degradation over multiple releases of a software program or the analysis of performance differences among different configurations becomes very difficult.
A last problem is that performance regression testing in a quality assurance (QA) process could not detect critical performance degradation if performance optimizations had been applied simultaneously. Even if the performance degradation was detected, it was not easy to fix the problem quickly because of difficulties in analysis. This is because multiple parts of the software system can affect performance directly and indirectly. Sometimes, users have to review a code change history among several snapshots of the code to determine where performance degradation occurs. Also, incremental performance tests may be performed by applying every single change to the change history one by one and checking which change causes the regression. This is a very tedious process for a user to perform.